# $ID$
# Maintainer: Rémy Oudompheng <remy@archlinux.org>

pkgname=perl-lingua-translit
_dist=Lingua-Translit
pkgver=0.28
pkgrel=6
pkgdesc="Transliteration of text between writing systems"
arch=('any')
url="https://metacpan.org/release/${_dist}"
license=('PerlArtistic' 'GPL')
depends=('perl')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/A/AL/ALINKE/${_dist}-${pkgver}.tar.gz)
md5sums=('090cecd52ff9c1f9d4b370ba653b9da1')
sha256sums=('113f91d8fc2c630437153a49fb7a52b023af8f6278ed96c070b1f60824b8eae1')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
